package com.dsh.subscribeSetting.controller;

import com.dsh.model.Result;
import com.dsh.subscribeSetting.entity.ConsultationAppointment;
import com.dsh.subscribeSetting.entity.TreatmentAppointment;
import com.dsh.subscribeSetting.service.ConsultationAppointmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 咨询列表(ConsultationAppointment)表控制层
 *
 * @author makejava
 * @since 2022-05-12 10:05:13
 */
@Api(tags = "预约设置")
@RestController
@RequestMapping("consultationAppointment")
public class ConsultationAppointmentController {
    /**
     * 服务对象
     */
    @Resource
    private ConsultationAppointmentService consultationAppointmentService;

    /**
     * 通过主键查询单条数据
     *
     * @return 单条数据
     */
    @ApiOperation(value = "查看咨询预约",response = ConsultationAppointment.class)
    @GetMapping("queryOne")
    public Result queryOne() {
        ConsultationAppointment consultationAppointment = consultationAppointmentService.queryById();
        return Result.success(consultationAppointment,"");
    }
    @ApiOperation(value = "查看治疗理疗预约",response = ConsultationAppointment.class)
    @GetMapping("selectOne")
    public Result selectOne() {
        TreatmentAppointment treatmentAppointment = consultationAppointmentService.selectOne();
        return Result.success(treatmentAppointment,"");
    }

}